package com.hzw.saas.common.config.util;


public final class StringUtil {
    public static boolean isEmpty(String str) {
        return null == str || str.trim().isEmpty();
    }

    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }

    public static String appendIfNotContain(String str, String appendStr, String otherwise) {
        if (!isEmpty(str) && !isEmpty(appendStr)) {
            return str.contains(appendStr) ? str.concat(otherwise) : str.concat(appendStr);
        } else {
            return str;
        }
    }

    private StringUtil() {
        throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");
    }
}

